package com.pda.xinma.utils;

import com.wangshen.base.ui.mvp.base.view.BaseView;

public class DateSelectUtils {
    private static DateSelectUtils dateSelectUtils=new DateSelectUtils();
    private DateSelectUtils() {
    }
    public static DateSelectUtils getInstance(){
        return dateSelectUtils;
    }
    public void showSelect(BaseView baseView, String entryNo, String articleId, int type, OnSelectCallBack onSelectCallBack){
        baseView.showLoadingDialog();
       /* NetUtils.geApi().palletShelves(entryNo,articleId,type)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(new Consumer<BaseAppEntity<List<String>>>() {
                    @Override
                    public void accept(BaseAppEntity<List<String>> manualPickingBeanBaseAppEntity) throws Exception {
                        List<SelectBean> selectBeans=new ArrayList<>();
                        for (String item: manualPickingBeanBaseAppEntity.getData()){
                            selectBeans.add(new SelectBean(item,""));
                        }
                        SelectPop selectPop=new SelectPop(baseView.getProviderContext(), new SelectPop.Onclick() {
                            @Override
                            public void onClick(SelectBean content) {
                                onSelectCallBack.onSelect(content.getName());
                            }
                        });
                        selectPop.show(selectBeans);
                        baseView.hideLoadingDialog();
                    }
                }, new Consumer<Throwable>() {
                    @Override
                    public void accept(Throwable throwable) throws Exception {
                       baseView.hideLoadingDialog();
                    }
                });*/
    }
    public static interface OnSelectCallBack{
        void onSelect(String content);
    }
}
